<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        function Person(name,age,sex,stature) {
            var obj = new Object();
            obj.name = name;
            obj.age = age;
            obj.sex = sex;
            obj.stature = stature;
            obj.drive = function () {
                console.log('会开车');
            };
            obj.programme = function () {
                console.log('会编程');
            };
            return obj;
        }
        var hanMeiMei = Person('韩梅梅','17岁','女','165cm');
        var wangDaZhi = Person('王大志','19岁','男','174cm');
        var zhangDaDan = Person('张大胆','20岁','男','150cm');
        var heXianFeng = Person('何先锋','16岁','男','160cm');
        console.log(hanMeiMei.name);
    </script>
</body>
</html>